package com.yilee.idouban.authorize;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;

import com.yilee.idouban.MainActivity;
import com.yilee.idouban.R;

public class AuthorizeActivity extends Activity {

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_authorize);
		doAuthResponse(getIntent().getExtras());
	}

	private void doAuthResponse(Bundle b) {
		if (b != null && b.containsKey("result")) {
			Intent intent = new Intent(AuthorizeActivity.this,
					MainActivity.class);
			intent.putExtras(b);
			startActivity(intent);
			finish();
		}
	}

}
